package com.itheima.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.itheima.reggie.entity.Dish;
import com.itheima.reggie.entity.dto.DishDto;
import com.itheima.reggie.entity.dto.PageDto;
import com.itheima.reggie.web.R;

import java.util.List;

/**
 * 菜品业务层接口
 * @Author Vsunks.v
 * @Blog blog.sunxiaowei.net
 * @Description: 菜品业务层接口
 */
public interface DishService extends IService<Dish> {
    R saveWithFlavorException(DishDto dishDto) throws Exception;
    R saveWithFlavor(DishDto dishDto) ;
    R<Page<DishDto>> pageWithCategoryName(PageDto pageDto);

    R<DishDto> getByIdWithFlavors(Long id);

    R updateByIdWithFlavors(DishDto dishDto);

    R switchStatus(Integer status, Long[] ids);

    R<List<Dish>> listByCondition(Long categoryId);

    R<List<DishDto>> listByCondition(Dish dish);
}
